﻿using Microsoft.AspNet.Identity;
using System.Security.Claims;
using System.Security.Principal;

namespace DictionaryWebApp.Helpers
{
    public static class IdentityExtension
    {
        public static string GetUserId(this IIdentity identity)
        {
            return (identity as ClaimsIdentity).FindFirstValue("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier");
        }
    }
}